package com.logistics.map.entity.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import com.logistics.map.entity.model.MapRouteEdgesSave;
import com.logistics.utils.tool.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.xml.soap.SAAJMetaFactory;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhiyu.fan
 * @since 2024-06-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("lgs_map_route_edges")
public class MapRouteEdges implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String routeCode;

    private String clazz;

    private String isArrow;

    private String isDash;

    private String color;

    private String controlPoints;

    private String endPoint;

    private String uuid;

    private String lineWidth;

    private String label;

    private String source;

    private String startPoint;

    private String target;

    private String type;

    public MapRouteEdges(){}

    public MapRouteEdges(MapRouteEdgesSave save){
        this.routeCode = save.getRouteCode();
        this.clazz = save.getClazz();
        this.isArrow = save.getIsArrow();
        this.isDash = save.getIsDash();
        this.color = save.getColor();
        this.controlPoints = save.getControlPoints();
        this.endPoint = save.getEndPoint();
        this.uuid = save.getUuid();
        this.lineWidth = save.getLineWidth();
        this.label = save.getLabel();
        this.source = save.getSource();
        this.startPoint = save.getStartPoint();
        this.target = save.getTarget();
        this.type = save.getType();
    }

    public static MapRouteEdges build(MapRouteEdgesSave save){
        return new MapRouteEdges(save);
    }
}
